{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="{% static 'jquery-1.2.6.js' %}"></script>
    <script>
        function getajax() {
            //获取隐藏域的csftoken的值
            var to = $('input[name="csrfmiddlewaretoken"]').val()
            //发送post的ajax请求
            $.post('/student/get/','uname=zahngsan&pwd=13&csrfmiddlewaretoken='+to,function (res) {
                alert(resg.flag)
            })
        }
    </script>
</head>
<body>
{% csrf_token %}
<input type="submit" value="get" onclick="getajax()">

</body>
</html>